<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>DOM节点</title>
</head>
<body>
	

	<div id="div1">
		<p id="p1">我是第一个</p>
		<p id="p2">我是第二个</p>
	</div>
	<script>
		var p=document.createElement("p");
		var word = document.createTextNode("我是新增的p标签");

		p.appendChild(word);
		var div1 = document.getElementById("div1");
		div1.appendChild(p);
		div1.removeChild(p1);

	</script>
</body>
</html>